﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class user_writenote : Wozuji.Logic.PageLogin
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Page.Header.Title = "足迹网 写日志";
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        if (title.Text.Equals(""))
        {
            Wozuji.Common.MessageBox.Show(Page, "标题忘了输吧");
        }
        else if (txtContent.Text.Equals(""))
        {
            Wozuji.Common.MessageBox.Show(Page, "内容还没输呢");
        }
        else {

            Wozuji.Model.UserPost_t up = new Wozuji.Model.UserPost_t();
            up.UserPost_Title = title.Text.ToString();
            up.UserPost_Content = txtContent.Text.ToString();
            up.UserPost_Hit = 0;
            up.UserPost_IsTop = false;
            up.UserPost_Time = DateTime.Now;
            up.UserPost_Updatetime = DateTime.Now;
            up.UserPost_tags = target.Text.ToString();
            up.UserPost_Replay =0;
            up.UserPost_UserId = Convert.ToInt32(Session["userid"].ToString());
            up.UserPost_TeamId = 0;
            up.UserPost_setConfig=setconfig.SelectedItem.Value;
            up.UserPost_openConfig = openconfig.SelectedItem.Value;
            Wozuji.BLL.UserPost_t upbll = new Wozuji.BLL.UserPost_t();
            Wozuji.Common.MessageBox.Show(Page,"发表成功了～.～");
            upbll.Add(up);
        }
    }
}
